<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="div" id="div">
        <img src='img/1.png' alt=''>
        <img src='img/1.png' alt=''>:
        <img src='img/1.png' alt=''>
        <img src='img/1.png' alt=''>:
        <img src='img/1.png' alt=''>
        <img src='img/1.png' alt=''>
    </div>
    <!-- ## 4.数码时钟
-   根据定时器动态改变img 的src的路径
-   img.src = '' -->

        <script>
            function timee(){
                var date =new Date();//获取当前时间
                var Hours= date.getHours()< 10 ? '0'+date.getHours():date.getHours();//时
                var Minutes=date.getMinutes() < 10?'0'+date.getMinutes():date.getMinutes();//分
                var Seconds=date.getSeconds() < 10?'0'+date.getSeconds():date.getSeconds();//秒
                var sz="" + Hours+Minutes+Seconds;
                console.log(sz);
                for(var i=0;i<sz.length;i++){
                    div.children[i].src = "img/"+sz[i]+".png";
                }
            }
            timee()


            var timer=setInterval(function(){
                timee()
            },1000)
           

            
        </script>




</body>
</html>